package org.ccay.sitemap.service;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

import org.ccay.core.exception.ApplicationException;
import org.ccay.sitemap.SiteNodeSimpleVO;
import org.ccay.sitemap.SiteNodeVO;

/**
 * siteMap 服务实现接口	
 */
@Path("query")
@Produces("application/json")
public interface ISiteMapQueryService {
	
	/**
	 * Cache名
	 */
	static final String SITE_MAP = "siteMap";
	
	/**
	 * 提示信息关键字
	 */
	static final String SITE_MAP_NODE = "SiteMap Node";
	
	/** 获取已授权的SiteMap	
	 * @return
	 * @throws ApplicationException 
	 */
	@GET
	@Path("/tree")
	public SiteNodeSimpleVO findAuthorizedSiteMap() throws ApplicationException;
	
	/** 
	 * 更具语言 获取完整（无权限过滤）的导航菜单栏
	 * @param viewName
	 * @param language
	 * @return
	 * @throws ApplicationException
	 */
	SiteNodeVO findWholeSiteMap(String language) throws ApplicationException;

	/**
	 * 根据父节点ID获取导航菜单栏	
	 * @param parentId
	 * @return
	 * @throws ApplicationException
	 */
	SiteNodeVO findOneSiteMapByParentId(String parentId) throws ApplicationException;

	/**
	 * 查询单个栏目节点	
	 * @param siteNodeVO
	 * @return
	 * @throws ApplicationException
	 */
	SiteNodeVO findSiteNode(SiteNodeVO siteNodeVO) throws ApplicationException;

	/**
	 *  延时加载SiteNode 
	 * @param siteNodeVO
	 * @return
	 * @throws ApplicationException
	 */
	List<SiteNodeVO> findSiteNodeTreeList(SiteNodeVO siteNodeVO) throws ApplicationException;

	/**
	 * 查询总数
	 * @param siteNodeVO
	 * @return
	 */
	int findCountSiteNode(SiteNodeVO siteNodeVO);
	
}
